'''
递归
调用自己
'''

import time
def story():
    print("你好，妹妹")
    print("你好，姊姊")

    time.sleep(2)
    story()

# story()


def get_sum(n):
    if n == 100:
        return 100
    return n+get_sum(n+1)

# print(get_sum(1))


# 阶乘
# 3=1*2*3  4=1*2*3*4
def jc(n):
    if n==1:
        return 1
    return n*jc(n-1)

# print(jc(4))

# 闭包
def f():
    y=10
    def ff(a):
        return a+y
    return ff


k = f()
print(k(2))
